/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
import _ from 'lodash';
export default function access(initialState: { currentUser?: API.UserInfo } | undefined) {
  const { currentUser } = initialState ?? {};
  return {
    canAdmin: !_.isEmpty(currentUser?.userID),
  };
}
